Skip to content

Move local and remote project skills to use RepoMetadataModel#11559

Merged
moirahuang merged 12 commits into
masterfrom
moira/skills-acquisition-repometadata
May 28, 2026
Merged

Move local and remote project skills to use RepoMetadataModel#11559
moirahuang merged 12 commits into
masterfrom
moira/skills-acquisition-repometadata

Conversation

@moirahuang

@moirahuang moirahuang commented May 22, 2026

Copy link
Copy Markdown
Contributor

Description

Migrates local project skills away from ProjectSkillSubscriber in the normal indexed-repository path and instead discovers project skill files through RepoMetadataModel. Gitignored skills subtrees are deliberately added to RepoMetadataModel

If local repository metadata indexing fails (for example, when a repository is too large to index), the existing local project-skill watcher fallback remains available.

Testing

Added unit tests + locally tested

Screenshots / Videos

Regular skills
https://github.com/user-attachments/assets/ce2f6abf-ecf6-4f77-8848-313b41b0a3d7

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label May 22, 2026
@moirahuang moirahuang requested a review from kevinyang372 May 22, 2026 18:45
@oz-for-oss

oz-for-oss Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR moves project skill discovery from provider directories to concrete SKILL.md files returned by RepoMetadataModel, adding remote-path-aware discovery helpers while keeping local hydration in the watcher.

Concerns

  • Queued project directory handling now treats unrelated directory creations under a skill's owning repo/subtree as relevant to existing skills, which can re-emit already loaded skills whenever ordinary directories are created.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/skills/file_watchers/skill_watcher.rs Outdated
@moirahuang

Copy link
Copy Markdown
Contributor Author

/oz-review

@oz-for-oss

oz-for-oss Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR moves project skill discovery from the local project watcher/subscriber path onto RepoMetadataModel, adds file-based skill discovery helpers, and teaches repo metadata to eagerly load ignored skill provider paths.

Concerns

  • Remote project skill paths are discovered as LocalOrRemotePath::Remote but then filtered through to_local_path() before parsing, so remote repository updates still emit no project skills.
  • Removing the separate local project watcher also removes the code path that handled symlinked project skill directories, while repo metadata continues to skip directory symlinks.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/skills/file_watchers/skill_watcher.rs
Comment thread app/src/ai/skills/file_watchers/skill_watcher.rs Outdated
@moirahuang moirahuang requested a review from peicodes May 22, 2026 22:44
@moirahuang moirahuang force-pushed the moira/skills-acquisition-repometadata branch from a484e3f to 077d252 Compare May 22, 2026 23:45

moirahuang commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@oz-for-oss

oz-for-oss Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR moves project skill discovery onto RepoMetadataModel, adds ignored-path interests so gitignored skill provider paths can be represented in repo metadata, and updates skill watcher/utils tests for local, ignored, remote-path, and symlinked project skill cases.

Concerns

  • No blocking correctness or security concerns found in the annotated diff.
  • Spec context: no approved or repository spec context was available for this PR.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@moirahuang moirahuang marked this pull request as draft May 23, 2026 02:01
}

// Subscribe to home directory skills via DirectoryWatcher.
// TODO: Migrate home/global skill watching onto RepoMetadataModel as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling this out because i'm not doing this as part of this PR but we'll eventually want to migrate global skills as well

Comment thread app/src/lib.rs
} else {
RepoMetadataModel::new(ctx)
};
model.register_ignored_path_interests(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm this does have the side effect of gitignored skills directories showing up in the file tree which i think we don't want. working on a fix now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed this a bit with aloke. we're going to still directly register the gitignored skills subtrees. there shouldn't be significant performance concerns to doing this since skill directories are relatively contained in size + there shouldn't be changes in product behavior

@moirahuang moirahuang marked this pull request as ready for review May 27, 2026 22:56
@oz-for-oss

oz-for-oss Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR moves project skill discovery onto RepoMetadataModel, registers skill provider paths as ignored-path interests, and keeps a local filesystem fallback for metadata failures. The main correctness path is covered by added tests, and I did not find security issues in the changed diff.

Concerns

  • The metadata-failure fallback scans and parses the repository synchronously on the model context, which can block the app exactly for the large repos this fallback is meant to support.
  • The same fallback scan skips symlinked skill directories during its initial pass, so existing symlink-backed project skills can remain unavailable until a later filesystem event occurs.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/skills/file_watchers/utils.rs Outdated
Comment thread app/src/ai/skills/file_watchers/skill_watcher.rs Outdated
@moirahuang moirahuang force-pushed the moira/skills-acquisition-repometadata branch from 565ce4b to 809eb44 Compare May 27, 2026 23:10
}

// Queue project directory creations for later processing since the file tree is not yet updated
self.queued_project_directory_creations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer needed because repo metadata will fire events after the tree is updated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup exactly

@peicodes peicodes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach LGTM. My general concerns with skill changes are:

  • Reading skills synchronously
  • Race conditions between reading skills and surfacing them in SkillManager

Neither seems to apply here so I think we're good?

@moirahuang moirahuang enabled auto-merge (squash) May 28, 2026 18:47
Co-Authored-By: Oz <oz-agent@warp.dev>
@moirahuang moirahuang merged commit f6e6f78 into master May 28, 2026
26 checks passed
@moirahuang moirahuang deleted the moira/skills-acquisition-repometadata branch May 28, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants